﻿using AIY;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace PartyWorkSupervise.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class EmployeeController : ControllerBase
    {
        private readonly Add db;
        public EmployeeController(Add context)
        {
            db = context;
        }

        [HttpGet("Employee")]
        public object GetPe()
        {
            return db.Employee.ToList();
        }
        [HttpGet("Employee1")]
        public object GetPe1()
        {
            return db.Employee.Where(s => s.Postion ==1).ToList();
        }




    }
}
